﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RepositoryEntity
{
    /// <summary>
    /// 工作流步骤表
    /// </summary>
    public class WorkFlow_InstanceStep:BaseDeleteEntity
    {



        ///// <summary>
        ///// 主键ID
        ///// </summary>
        //[Required]
        //[Column(TypeName = "varchar(32)")]
        //public string ID { get; set; }

        /// <summary>
        /// 审核人Id
        /// </summary>
        [Column(TypeName = "varchar(36)")]
        [Required]
        public string ReviewerId { get; set; }



        /// <summary>
        /// 审核理由
        /// </summary>
        [Column(TypeName = "nvarchar(64)")]
        public string ReviewerReason { get; set; }




        /// <summary>
        /// 审核状态【1：审核中；2：结束；3：作废】
        /// </summary>
        public InstanceStepStatus ReviewerStatus { get; set; }




        /// <summary>
        /// 审核时间
        /// </summary>
        [Column(TypeName = "datetime")]
        public DateTime? ReviewerTime { get; set; }




        ///// <summary>
        ///// 下一个审核人Id
        ///// </summary>
        //[Column(TypeName = "varchar(36)")]
        //public string NextReviewerId { get; set; }

        /// <summary>
        /// 工作流实例Id
        /// </summary>
        [Column(TypeName = "varchar(36)")]
        public string InstanceId { get; set; }

        /// <summary>
        /// 上一个步骤Id
        /// </summary>
        [Column(TypeName = "varchar(36)")]
        public string BeforeStepId { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }


        public enum InstanceStepStatus
        {
            审核中 = 1,
            同意 = 2,
            驳回 = 3,
            作废 = 4,
            已审批 = 5,
        }
    }
}
